package com.lovo.commom.WebRemote;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "sscwebtwo",path = "/product", contextId = "webProductId")
public interface IWebProductRemote {
    /**
     * 修改商品状态
     * @param productName 商品名
     * @param status 状态(0-未上架、1-未审核、2-审核不通过、3-审核通过、4-已下架)
     */
    @RequestMapping("updateProductStatus")
    void updateProductStatus(@RequestParam(value = "productName")String productName, @RequestParam(value = "status")int status);

    @GetMapping("inKu/{productName}/{specs}/{num}")
    public boolean inKu(@PathVariable("productName") String productName, @PathVariable("specs") String specs, @PathVariable("num") int num);

    /**
     * 商品促销
     * @param productNames 商品名
     * @param discount 折扣率
     * @return
     */
    @RequestMapping("updateIsPermission")
    public boolean updateIsPermission(@RequestParam("productNames") List<String> productNames, @RequestParam("discount") float discount);
}
